//Alex Silkin 

#ifndef TABLE_INTERFACE_H
#define TABLE_INTERFACE_H

#include <string>
#include "Kit.h"
#include "KitInterface.h"
#include "qpoint.h"
#include "GUIBase.h"

class Kit;

class TableInterface {

public:
	TableInterface(std::string name);

	//~Table();

	// ------------------------------------------------------------------------------------
	// Utility:
	std::string toString() const;
	// ------------------------------------------------------------------------------------


	// ------------------------------------------------------------------------------------
	// Capacity:

	bool isInspectorSlotAvailable();

	bool isATableSlotAvailable(); //either first or second slot 

	// ------------------------------------------------------------------------------------


	// ------------------------------------------------------------------------------------
	// Element acess:

	int getIndexOf(Kit* k); 

	Kit* peek(int index);

	Kit* remove(int index); //returns kit that was removed 

	int getAvailableFirstTwoTables(); //if none returns -1

	// ------------------------------------------------------------------------------------


	// ------------------------------------------------------------------------------------
	// Modifiers:
	virtual void insert(Kit* data, int index); //put kit at index 
	// ------------------------------------------------------------------------------------


	// ------------------------------------------------------------------------------------
	// GUI Stuff:
	virtual QPoint getTableSlotPosition(int slot); //returns coordinates of given slot 

	// ------------------------------------------------------------------------------------

protected:

	// ------------------------------------------------------------------------------------
	// Data:
	Kit  **kits; //array of kits 
	std::string name; 
	// ------------------------------------------------------------------------------------

};

#endif
